import request from '@/utils/request'

// 查询租售合同列表
export function listRentalcontract(query) {
  return request({
    url: '/feeSettings/rentalcontract/list',
    method: 'get',
    params: query
  })
}
//查询代缴费
export function getpend(id) {
  return request({
    url: '/AmountMoney/Pending/' + id,
    method: 'get'
  })
}
//查询历史缴费
export function getpend1(id) {
  return request({
    url: '/AmountMoney/Pending1/' + id,
    method: 'get'
  })
}
// 查询租售合同详细
export function getRentalcontract(id) {
  return request({
    url: '/feeSettings/rentalcontract/' + id,
    method: 'get'
  })
}

// 根据did和bid查询租赁信息
export function getMap(did,bid) {
  return request({
    url: '/feeSettings/rentalcontract/' + did+"/"+bid,
    method: 'get'
  })
}



// 新增租售合同
export function addRentalcontract(data) {
  return request({
    url: '/feeSettings/rentalcontract',
    method: 'post',
    data: data
  })
}

// 修改租售合同
export function updateRentalcontract(data) {
  return request({
    url: '/feeSettings/rentalcontract',
    method: 'put',
    data: data
  })
}

//查询代缴费
export function updateState(id) {
  return request({
    url: '/feeSettings/rentalcontract/' + id,
    method: 'put'
  })
}

// 删除租售合同
export function delRentalcontract(id) {
  return request({
    url: '/feeSettings/rentalcontract/' + id,
    method: 'delete'
  })
}
